﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Remoting.Contexts;
using System.Runtime.Remoting.Activation;

namespace _1Dot9MasterTransactions
{
    [AttributeUsage(AttributeTargets.Class)]
    internal sealed class TransactionalContextAttribute : Attribute, IContextAttribute
    {
        // Methods
        void IContextAttribute.GetPropertiesForNewContext(IConstructionCallMessage msg)
        {
            TransactionalContextProperty prop = new TransactionalContextProperty();
            msg.ContextProperties.Add(prop);
        }

        bool IContextAttribute.IsContextOK(Context ctx, IConstructionCallMessage msg)
        {
            return false;
        }
    }
}
